#ifndef FEIG_H
#define FEIG_H

#include <QtGui/QMainWindow>
#include "ui_feig.h"
#include "usermng.h"
#include "FGMsgMng.h"
#include "receivemsg.h"


class FeiG : public QMainWindow
{
	Q_OBJECT

public:
	FeiG(QWidget *parent = 0, Qt::WFlags flags = 0);
	~FeiG();
	const receivemsglist* getMsgList() const { return &msgList; }
private:
	Ui::FeiGClass ui;
	usermng _usermng;
	receivemsglist msgList;


	MsgBuf recMsgBuf;
Q_SIGNALS:
	void AddToMsgList(const QString&,const QString&);
private slots:
	void on_treeWidget_ProjectMate_itemClicked(QTreeWidgetItem*,int);

	void on_treeWidget_ProjectMate_itemDoubleClicked(QTreeWidgetItem*,int);
	void ReceiveMsg( MsgBuf * recMsgBuf);

	void userOffLine( userViewInfo &userinfo );
	void RecvMsg( userViewInfo &userinfo, MsgBuf * recMsgBuf )
	{
		emit AddToMsgList(userinfo.IP.toString(),QString::fromLocal8Bit(recMsgBuf->msgBuf));
	}
};

#endif // FEIG_H
